#include "SMPPMessageDeliveryRequestTLVs.hpp"

using namespace smpp::pdu;

MessageDeliveryRequestTLVs::MessageDeliveryRequestTLVs(
const CallbackNum *nCallbackNum,const CallbackNumAtag *nCallbackNumAtag,
const CallbackNumPresInd *nCallbackNumPresInd,
const DestAddrNpCountry *nDestAddrNpCountry,
const DestAddrNpInformation *nDestAddrNpInformation,
const DestAddrNpResolution *nDestAddrNpResolution,
const DestAddrSubunit *nDestAddrSubunit,
const DestNetworkId *nDestNetworkId,const DestNodeId *nDestNodeId,
const DestSubaddress *nDestSubaddress,const DestPort *nDestPort,
const DpfResult *nDpfResult,const ItsReplyType *nItsReplyType,
const ItsSessionInfo *nItsSessionInfo,
const LanguageIndicator *nLanguageIndicator,
const MessagePayload *nMessagePayload,
const MessageState *nMessageState,
const NetworkErrorCode *nNetworkErrorCode,
const PayloadType *nPayloadType,
const PrivacyIndicator *nPrivacyIndicator,
const ReceiptedMessageId *nReceiptedMessageId,
const SarMsgRefNum *nSarMsgRefNum,
const SarSegmentSeqnum *nSarSegmentSeqnum,
const SarTotalSegments *nSarTotalSegments,
const SourceAddrSubunit *nSourceAddrSubunit,
const SourceNetworkId *nSourceNetworkId,
const SourceNodeId *nSourceNodeId,
const SourcePort *nSourcePort,const SourceSubaddress *nSourceSubaddress,
const UserMessageReference *nUserMessageReference,
const UserResponseCode *nUserResponseCode,
const UssdServiceOp *nUssdServiceOp):_CallbackNum(0),
_CallbackNumAtag(0),_CallbackNumPresInd(0),_DestAddrNpCountry(0),
_DestAddrNpInformation(0),_DestAddrNpResolution(0),_DestAddrSubunit(0),
_DestNetworkId(0),_DestNodeId(0),_DestSubaddress(0),_DestPort(0),
_DpfResult(0),_ItsReplyType(0),_ItsSessionInfo(0),_LanguageIndicator(0),
_MessagePayload(0),_MessageState(0),_NetworkErrorCode(0),_PayloadType(0),
_PrivacyIndicator(0),_ReceiptedMessageId(0),_SarMsgRefNum(0),
_SarSegmentSeqnum(0),_SarTotalSegments(0),_SourceAddrSubunit(0),
_SourceNetworkId(0),_SourceNodeId(0),_SourcePort(0),_SourceSubaddress(0),
_UserMessageReference(0),_UserResponseCode(0),_UssdServiceOp(0){
	if(nCallbackNum)
		_CallbackNum = new CallbackNum(*nCallbackNum);
	if(nCallbackNumAtag)
		_CallbackNumAtag = new CallbackNumAtag(*nCallbackNumAtag);
	if(nCallbackNumPresInd)
		_CallbackNumPresInd = 
		new CallbackNumPresInd(*nCallbackNumPresInd);
	if(nDestAddrNpCountry)
		_DestAddrNpCountry = 
		new DestAddrNpCountry(*nDestAddrNpCountry);
	if(nDestAddrNpInformation)
		_DestAddrNpInformation = 
		new DestAddrNpInformation(*nDestAddrNpInformation);
	if(nDestAddrNpResolution)
		_DestAddrNpResolution = 
		new DestAddrNpResolution(*nDestAddrNpResolution);
	if(nDestAddrSubunit)
		_DestAddrSubunit = new DestAddrSubunit(*nDestAddrSubunit);
	if(nDestNetworkId)
		_DestNetworkId = new DestNetworkId(*nDestNetworkId);
	if(nDestNodeId)
		_DestNodeId = new DestNodeId(*nDestNodeId);
	if(nDestSubaddress)
		_DestSubaddress = new DestSubaddress(*nDestSubaddress);
	if(nDestPort)
		_DestPort = new DestPort(*nDestPort);
	if(nDpfResult)
		_DpfResult = new DpfResult(*nDpfResult);
	if(nItsReplyType)
		_ItsReplyType = new ItsReplyType(*nItsReplyType);
	if(nItsSessionInfo)
		_ItsSessionInfo = new ItsSessionInfo(*nItsSessionInfo);
	if(nLanguageIndicator)
		_LanguageIndicator = 
		new LanguageIndicator(*nLanguageIndicator);
	if(nMessagePayload)
		_MessagePayload = new MessagePayload(*nMessagePayload);
	if(nMessageState)
		_MessageState = 
		new MessageState(*nMessageState);
	if(nNetworkErrorCode)
		_NetworkErrorCode = new NetworkErrorCode(*nNetworkErrorCode);
	if(nPayloadType)
		_PayloadType = new PayloadType(*nPayloadType);
	if(nPrivacyIndicator)
		_PrivacyIndicator = new PrivacyIndicator(*nPrivacyIndicator);
	if(nReceiptedMessageId)
		_ReceiptedMessageId = new ReceiptedMessageId(*nReceiptedMessageId);
	if(nSarMsgRefNum)
		_SarMsgRefNum = new SarMsgRefNum(*nSarMsgRefNum);
	if(nSarSegmentSeqnum)
		_SarSegmentSeqnum = new SarSegmentSeqnum(*nSarSegmentSeqnum);
	if(nSarTotalSegments)
		_SarTotalSegments = new SarTotalSegments(*nSarTotalSegments);
	if(nSourceAddrSubunit)
		_SourceAddrSubunit = 
		new SourceAddrSubunit(*nSourceAddrSubunit);
	if(nSourceNetworkId)
		_SourceNetworkId = new SourceNetworkId(*nSourceNetworkId);
	if(nSourceNodeId)
		_SourceNodeId = new SourceNodeId(*nSourceNodeId);
	if(nSourcePort)
		_SourcePort = new SourcePort(*nSourcePort);
	if(nSourceSubaddress)
		_SourceSubaddress = new SourceSubaddress(*nSourceSubaddress);
	if(nUserMessageReference)
		_UserMessageReference = 
		new UserMessageReference(*nUserMessageReference);
	if(nUserResponseCode)
		_UserResponseCode = new UserResponseCode(*nUserResponseCode);
	if(nUssdServiceOp)
		_UssdServiceOp = new UssdServiceOp(*nUssdServiceOp);
}

MessageDeliveryRequestTLVs::MessageDeliveryRequestTLVs(
const MessageDeliveryRequestTLVs &nMessageDeliveryRequestTLVs):
_CallbackNum(0),
_CallbackNumAtag(0),
_CallbackNumPresInd(0),
_DestAddrNpCountry(0),
_DestAddrNpInformation(0),
_DestAddrNpResolution(0),
_DestAddrSubunit(0),
_DestNetworkId(0),
_DestNodeId(0),
_DestSubaddress(0),
_DestPort(0),
_DpfResult(0),
_ItsReplyType(0),
_ItsSessionInfo(0),
_LanguageIndicator(0),
_MessagePayload(0),
_MessageState(0),
_NetworkErrorCode(0),
_PayloadType(0),
_PrivacyIndicator(0),
_ReceiptedMessageId(0),
_SarMsgRefNum(0),
_SarSegmentSeqnum(0),
_SarTotalSegments(0),
_SourceAddrSubunit(0),
_SourceNetworkId(0),
_SourceNodeId(0),
_SourcePort(0),
_SourceSubaddress(0),
_UserMessageReference(0),
_UserResponseCode(0),
_UssdServiceOp(0){
	if(nMessageDeliveryRequestTLVs.getCallbackNum())
		_CallbackNum = new CallbackNum(
		*nMessageDeliveryRequestTLVs.getCallbackNum());
	if(nMessageDeliveryRequestTLVs.getCallbackNumAtag())
		_CallbackNumAtag = new CallbackNumAtag(
		*nMessageDeliveryRequestTLVs.getCallbackNumAtag());
	if(nMessageDeliveryRequestTLVs.getCallbackNumPresInd())
		_CallbackNumPresInd = 
		new CallbackNumPresInd(
		*nMessageDeliveryRequestTLVs.getCallbackNumPresInd());
	if(nMessageDeliveryRequestTLVs.getDestAddrNpCountry())
		_DestAddrNpCountry = 
		new DestAddrNpCountry(
		*nMessageDeliveryRequestTLVs.getDestAddrNpCountry());
	if(nMessageDeliveryRequestTLVs.getDestAddrNpInformation())
		_DestAddrNpInformation = 
		new DestAddrNpInformation(
		*nMessageDeliveryRequestTLVs.getDestAddrNpInformation());
	if(nMessageDeliveryRequestTLVs.getDestAddrNpResolution())
		_DestAddrNpResolution = 
		new DestAddrNpResolution(
		*nMessageDeliveryRequestTLVs.getDestAddrNpResolution());
	if(nMessageDeliveryRequestTLVs.getDestAddrSubunit())
		_DestAddrSubunit = new DestAddrSubunit(
		*nMessageDeliveryRequestTLVs.getDestAddrSubunit());
	if(nMessageDeliveryRequestTLVs.getDestNetworkId())
		_DestNetworkId = new DestNetworkId(
		*nMessageDeliveryRequestTLVs.getDestNetworkId());
	if(nMessageDeliveryRequestTLVs.getDestNodeId())
		_DestNodeId = new DestNodeId(
		*nMessageDeliveryRequestTLVs.getDestNodeId());
	if(nMessageDeliveryRequestTLVs.getDestSubaddress())
		_DestSubaddress = new DestSubaddress(
		*nMessageDeliveryRequestTLVs.getDestSubaddress());
	if(nMessageDeliveryRequestTLVs.getDestPort())
		_DestPort = new DestPort(
		*nMessageDeliveryRequestTLVs.getDestPort());
	if(nMessageDeliveryRequestTLVs.getDpfResult())
		_DpfResult = new DpfResult(
		*nMessageDeliveryRequestTLVs.getDpfResult());
	if(nMessageDeliveryRequestTLVs.getItsReplyType())
		_ItsReplyType = new ItsReplyType(
		*nMessageDeliveryRequestTLVs.getItsReplyType());
	if(nMessageDeliveryRequestTLVs.getItsSessionInfo())
		_ItsSessionInfo = new ItsSessionInfo(
		*nMessageDeliveryRequestTLVs.getItsSessionInfo());
	if(nMessageDeliveryRequestTLVs.getLanguageIndicator())
		_LanguageIndicator = 
		new LanguageIndicator(
		*nMessageDeliveryRequestTLVs.getLanguageIndicator());
	if(nMessageDeliveryRequestTLVs.getMessagePayload())
		_MessagePayload = new MessagePayload(
		*nMessageDeliveryRequestTLVs.getMessagePayload());
	if(nMessageDeliveryRequestTLVs.getMessageState())
		_MessageState = 
		new MessageState(
		*nMessageDeliveryRequestTLVs.getMessageState());
	if(nMessageDeliveryRequestTLVs.getNetworkErrorCode())
		_NetworkErrorCode = new NetworkErrorCode(
		*nMessageDeliveryRequestTLVs.getNetworkErrorCode());
	if(nMessageDeliveryRequestTLVs.getPayloadType())
		_PayloadType = new PayloadType(
		*nMessageDeliveryRequestTLVs.getPayloadType());
	if(nMessageDeliveryRequestTLVs.getPrivacyIndicator())
		_PrivacyIndicator = new PrivacyIndicator(
		*nMessageDeliveryRequestTLVs.getPrivacyIndicator());
	if(nMessageDeliveryRequestTLVs.getReceiptedMessageId())
		_ReceiptedMessageId = new ReceiptedMessageId(
		*nMessageDeliveryRequestTLVs.getReceiptedMessageId());
	if(nMessageDeliveryRequestTLVs.getSarMsgRefNum())
		_SarMsgRefNum = new SarMsgRefNum(
		*nMessageDeliveryRequestTLVs.getSarMsgRefNum());
	if(nMessageDeliveryRequestTLVs.getSarSegmentSeqnum())
		_SarSegmentSeqnum = new SarSegmentSeqnum(
		*nMessageDeliveryRequestTLVs.getSarSegmentSeqnum());
	if(nMessageDeliveryRequestTLVs.getSarTotalSegments())
		_SarTotalSegments = new SarTotalSegments(
		*nMessageDeliveryRequestTLVs.getSarTotalSegments());
	if(nMessageDeliveryRequestTLVs.getSourceAddrSubunit())
		_SourceAddrSubunit = 
		new SourceAddrSubunit(
		*nMessageDeliveryRequestTLVs.getSourceAddrSubunit());
	if(nMessageDeliveryRequestTLVs.getSourceNetworkId())
		_SourceNetworkId = new SourceNetworkId(
		*nMessageDeliveryRequestTLVs.getSourceNetworkId());
	if(nMessageDeliveryRequestTLVs.getSourceNodeId())
		_SourceNodeId = new SourceNodeId(
		*nMessageDeliveryRequestTLVs.getSourceNodeId());
	if(nMessageDeliveryRequestTLVs.getSourcePort())
		_SourcePort = new SourcePort(
		*nMessageDeliveryRequestTLVs.getSourcePort());
	if(nMessageDeliveryRequestTLVs.getSourceSubaddress())
		_SourceSubaddress = new SourceSubaddress(
		*nMessageDeliveryRequestTLVs.getSourceSubaddress());
	if(nMessageDeliveryRequestTLVs.getUserMessageReference())
		_UserMessageReference = 
		new UserMessageReference(
		*nMessageDeliveryRequestTLVs.getUserMessageReference());
	if(nMessageDeliveryRequestTLVs.getUserResponseCode())
		_UserResponseCode = new UserResponseCode(
		*nMessageDeliveryRequestTLVs.getUserResponseCode());
	if(nMessageDeliveryRequestTLVs.getUssdServiceOp())
		_UssdServiceOp = new UssdServiceOp(
		*nMessageDeliveryRequestTLVs.getUssdServiceOp());
}

MessageDeliveryRequestTLVs::~MessageDeliveryRequestTLVs(){
	if(_CallbackNum)
		delete _CallbackNum;
	if(_CallbackNumAtag)
		delete _CallbackNumAtag;
	if(_CallbackNumPresInd)
		delete _CallbackNumPresInd;
	if(_DestAddrNpCountry)
		delete _DestAddrNpCountry;
	if(_DestAddrNpInformation)
		delete _DestAddrNpInformation;
	if(_DestAddrNpResolution)
		delete _DestAddrNpResolution;
	if(_DestAddrSubunit)
		delete _DestAddrSubunit;
	if(_DestNetworkId)
		delete _DestNetworkId;
	if(_DestNodeId)
		delete _DestNodeId;
	if(_DestSubaddress)
		delete _DestSubaddress;
	if(_DestPort)
		delete _DestPort;
	if(_DpfResult)
		delete _DpfResult;
	if(_ItsReplyType)
		delete _ItsReplyType;
	if(_ItsSessionInfo)
		delete _ItsSessionInfo;
	if(_LanguageIndicator)
		delete _LanguageIndicator;
	if(_MessagePayload)
		delete _MessagePayload;
	if(_MessageState)
		delete _MessageState;
	if(_NetworkErrorCode)
		delete _NetworkErrorCode;
	if(_PayloadType)
		delete _PayloadType;
	if(_PrivacyIndicator)
		delete _PrivacyIndicator;
	if(_ReceiptedMessageId)
		delete _ReceiptedMessageId;
	if(_SarMsgRefNum)
		delete _SarMsgRefNum;
	if(_SarSegmentSeqnum)
		delete _SarSegmentSeqnum;
	if(_SarTotalSegments)
		delete _SarTotalSegments;
	if(_SourceAddrSubunit)
		delete _SourceAddrSubunit;
	if(_SourceNetworkId)
		delete _SourceNetworkId;
	if(_SourceNodeId)
		delete _SourceNodeId;
	if(_SourcePort)
		delete _SourcePort;
	if(_SourceSubaddress)
		delete _SourceSubaddress;
	if(_UserMessageReference)
		delete _UserMessageReference;
	if(_UserResponseCode)
		delete _UserResponseCode;
	if(_UssdServiceOp)
		delete _UssdServiceOp;
}

void MessageDeliveryRequestTLVs::setCallbackNum(
	const CallbackNum *nCallbackNum){
	if(_CallbackNum){
		delete _CallbackNum;
		_CallbackNum = 0;
	}
	if(nCallbackNum)
		_CallbackNum = 
		new CallbackNum(*nCallbackNum);
}

const CallbackNum *
	MessageDeliveryRequestTLVs::getCallbackNum() const{
	return _CallbackNum;
}

void MessageDeliveryRequestTLVs::setCallbackNumAtag(
	const CallbackNumAtag *nCallbackNumAtag){
	if(_CallbackNumAtag){
		delete _CallbackNumAtag;
		_CallbackNumAtag = 0;
	}
	if(nCallbackNumAtag)
		_CallbackNumAtag = 
		new CallbackNumAtag(*nCallbackNumAtag);
}

const CallbackNumAtag *
	MessageDeliveryRequestTLVs::getCallbackNumAtag() const{
	return _CallbackNumAtag;
}

void MessageDeliveryRequestTLVs::setCallbackNumPresInd(
	const CallbackNumPresInd *nCallbackNumPresInd){
	if(_CallbackNumPresInd){
		delete _CallbackNumPresInd;
		_CallbackNumPresInd = 0;
	}
	if(nCallbackNumPresInd)
		_CallbackNumPresInd = 
		new CallbackNumPresInd(*nCallbackNumPresInd);
}

const CallbackNumPresInd *
	MessageDeliveryRequestTLVs::getCallbackNumPresInd() const{
	return _CallbackNumPresInd;
}

void MessageDeliveryRequestTLVs::setDestAddrNpCountry(
	const DestAddrNpCountry *nDestAddrNpCountry){
	if(_DestAddrNpCountry){
		delete _DestAddrNpCountry;
		_DestAddrNpCountry = 0;
	}
	if(nDestAddrNpCountry)
		_DestAddrNpCountry = 
		new DestAddrNpCountry(*nDestAddrNpCountry);
}

const DestAddrNpCountry *
	MessageDeliveryRequestTLVs::getDestAddrNpCountry() const{
	return _DestAddrNpCountry;
}

void MessageDeliveryRequestTLVs::setDestAddrNpInformation(
	const DestAddrNpInformation *nDestAddrNpInformation){
	if(_DestAddrNpInformation){
		delete _DestAddrNpInformation;
		_DestAddrNpInformation = 0;
	}
	if(nDestAddrNpInformation)
		_DestAddrNpInformation = 
		new DestAddrNpInformation(*nDestAddrNpInformation);
}

const DestAddrNpInformation *
	MessageDeliveryRequestTLVs::getDestAddrNpInformation() const{
	return _DestAddrNpInformation;
}

void MessageDeliveryRequestTLVs::setDestAddrNpResolution(
	const DestAddrNpResolution *nDestAddrNpResolution){
	if(_DestAddrNpResolution){
		delete _DestAddrNpResolution;
		_DestAddrNpResolution = 0;
	}
	if(nDestAddrNpResolution)
		_DestAddrNpResolution = 
		new DestAddrNpResolution(*nDestAddrNpResolution);
}

const DestAddrNpResolution *
	MessageDeliveryRequestTLVs::getDestAddrNpResolution() const{
	return _DestAddrNpResolution;
}

const DestAddrSubunit *
	MessageDeliveryRequestTLVs::getDestAddrSubunit() const{
	return _DestAddrSubunit;
}

void MessageDeliveryRequestTLVs::setDestAddrSubunit(
	const DestAddrSubunit *nDestAddrSubunit){
	if(_DestAddrSubunit){
		delete _DestAddrSubunit;
		_DestAddrSubunit = 0;
	}
	if(nDestAddrSubunit)
		_DestAddrSubunit = 
		new DestAddrSubunit(*nDestAddrSubunit);
}

const DestNetworkId *
	MessageDeliveryRequestTLVs::getDestNetworkId() const{
	return _DestNetworkId;
}

void MessageDeliveryRequestTLVs::setDestNetworkId(
	const DestNetworkId *nDestNetworkId){
	if(_DestNetworkId){
		delete _DestNetworkId;
		_DestNetworkId = 0;
	}
	if(nDestNetworkId)
		_DestNetworkId = 
		new DestNetworkId(*nDestNetworkId);
}

void MessageDeliveryRequestTLVs::setDestNodeId(
	const DestNodeId *nDestNodeId){
	if(_DestNodeId){
		delete _DestNodeId;
		_DestNodeId = 0;
	}
	if(nDestNodeId)
		_DestNodeId = 
		new DestNodeId(*nDestNodeId);
}

const DestNodeId *
	MessageDeliveryRequestTLVs::getDestNodeId() const{
	return _DestNodeId;
}

void MessageDeliveryRequestTLVs::setDestSubaddress(
	const DestSubaddress *nDestSubaddress){
	if(_DestSubaddress){
		delete _DestSubaddress;
		_DestSubaddress = 0;
	}
	if(nDestSubaddress)
		_DestSubaddress = 
		new DestSubaddress(*nDestSubaddress);
}

const DestSubaddress *
	MessageDeliveryRequestTLVs::getDestSubaddress() const{
	return _DestSubaddress;
}

void MessageDeliveryRequestTLVs::setDestPort(
	const DestPort *nDestPort){
	if(_DestPort){
		delete _DestPort;
		_DestPort = 0;
	}
	if(nDestPort)
		_DestPort = 
		new DestPort(*nDestPort);
}

const DestPort *MessageDeliveryRequestTLVs::getDestPort() const{
	return _DestPort;
}

void MessageDeliveryRequestTLVs::setDpfResult(
	const DpfResult *nDpfResult){
	if(_DpfResult){
		delete _DpfResult;
		_DpfResult = 0;
	}
	if(nDpfResult)
		_DpfResult = 
		new DpfResult(*nDpfResult);
}

const DpfResult *
	MessageDeliveryRequestTLVs::getDpfResult() const{
	return _DpfResult;
}

void MessageDeliveryRequestTLVs::setItsReplyType(
	const ItsReplyType *nItsReplyType){
	if(_ItsReplyType){
		delete _ItsReplyType;
		_ItsReplyType = 0;
	}
	if(nItsReplyType)
		_ItsReplyType = 
		new ItsReplyType(*nItsReplyType);
}

const ItsReplyType *
	MessageDeliveryRequestTLVs::getItsReplyType() const{
	return _ItsReplyType;
}

void MessageDeliveryRequestTLVs::setItsSessionInfo(
	const ItsSessionInfo *nItsSessionInfo){
	if(_ItsSessionInfo){
		delete _ItsSessionInfo;
		_ItsSessionInfo = 0;
	}
	if(nItsSessionInfo)
		_ItsSessionInfo = 
		new ItsSessionInfo(*nItsSessionInfo);
}

const ItsSessionInfo *
	MessageDeliveryRequestTLVs::getItsSessionInfo() const{
	return _ItsSessionInfo;
}

void MessageDeliveryRequestTLVs::setLanguageIndicator(
	const LanguageIndicator *nLanguageIndicator){
	if(_LanguageIndicator){
		delete _LanguageIndicator;
		_LanguageIndicator = 0;
	}
	if(nLanguageIndicator)
		_LanguageIndicator = 
		new LanguageIndicator(*nLanguageIndicator);
}

const LanguageIndicator *
	MessageDeliveryRequestTLVs::getLanguageIndicator() const{
	return _LanguageIndicator;
}

void MessageDeliveryRequestTLVs::setMessagePayload(
	const MessagePayload *nMessagePayload){
	if(_MessagePayload){
		delete _MessagePayload;
		_MessagePayload = 0;
	}
	if(nMessagePayload)
		_MessagePayload = 
		new MessagePayload(*nMessagePayload);
}

const MessagePayload *
	MessageDeliveryRequestTLVs::getMessagePayload() const{
	return _MessagePayload;
}

void MessageDeliveryRequestTLVs::setMessageState(
	const MessageState *nMessageState){
	if(_MessageState){
		delete _MessageState;
		_MessageState = 0;
	}
	if(nMessageState)
		_MessageState = 
		new MessageState(*nMessageState);
}

const MessageState *
	MessageDeliveryRequestTLVs::getMessageState() const{
	return _MessageState;
}

void MessageDeliveryRequestTLVs::setNetworkErrorCode(
	const NetworkErrorCode *nNetworkErrorCode){
	if(_NetworkErrorCode){
		delete _NetworkErrorCode;
		_NetworkErrorCode = 0;
	}
	if(nNetworkErrorCode)
		_NetworkErrorCode = 
		new NetworkErrorCode(*nNetworkErrorCode);
}

const NetworkErrorCode *
	MessageDeliveryRequestTLVs::getNetworkErrorCode() const{
	return _NetworkErrorCode;
}

void MessageDeliveryRequestTLVs::setPayloadType(
	const PayloadType *nPayloadType){
	if(_PayloadType){
		delete _PayloadType;
		_PayloadType = 0;
	}
	if(nPayloadType)
		_PayloadType = 
		new PayloadType(*nPayloadType);
}

const PayloadType *
	MessageDeliveryRequestTLVs::getPayloadType() const{
	return _PayloadType;
}

void MessageDeliveryRequestTLVs::setPrivacyIndicator(
	const PrivacyIndicator *nPrivacyIndicator){
	if(_PrivacyIndicator){
		delete _PrivacyIndicator;
		_PrivacyIndicator = 0;
	}
	if(nPrivacyIndicator)
		_PrivacyIndicator = 
		new PrivacyIndicator(*nPrivacyIndicator);
}

const PrivacyIndicator *
	MessageDeliveryRequestTLVs::getPrivacyIndicator() const{
	return _PrivacyIndicator;
}

void MessageDeliveryRequestTLVs::setReceiptedMessageId(
	const ReceiptedMessageId *nReceiptedMessageId){
	if(_ReceiptedMessageId){
		delete _ReceiptedMessageId;
		_ReceiptedMessageId = 0;
	}
	if(nReceiptedMessageId)
		_ReceiptedMessageId = 
		new ReceiptedMessageId(*nReceiptedMessageId);
}

const ReceiptedMessageId *
	MessageDeliveryRequestTLVs::getReceiptedMessageId() const{
	return _ReceiptedMessageId;
}

void MessageDeliveryRequestTLVs::setSarMsgRefNum(
	const SarMsgRefNum *nSarMsgRefNum){
	if(_SarMsgRefNum){
		delete _SarMsgRefNum;
		_SarMsgRefNum = 0;
	}
	if(nSarMsgRefNum)
		_SarMsgRefNum = 
		new SarMsgRefNum(*nSarMsgRefNum);
}

const SarMsgRefNum *
	MessageDeliveryRequestTLVs::getSarMsgRefNum() const{
	return _SarMsgRefNum;
}

void MessageDeliveryRequestTLVs::setSarSegmentSeqnum(
	const SarSegmentSeqnum *nSarSegmentSeqnum){
	if(_SarSegmentSeqnum){
		delete _SarSegmentSeqnum;
		_SarSegmentSeqnum = 0;
	}
	if(nSarSegmentSeqnum)
		_SarSegmentSeqnum = 
		new SarSegmentSeqnum(*nSarSegmentSeqnum);
}

const SarSegmentSeqnum *
	MessageDeliveryRequestTLVs::getSarSegmentSeqnum() const{
	return _SarSegmentSeqnum;
}

void MessageDeliveryRequestTLVs::setSarTotalSegments(
	const SarTotalSegments *nSarTotalSegments){
	if(_SarTotalSegments){
		delete _SarTotalSegments;
		_SarTotalSegments = 0;
	}
	if(nSarTotalSegments)
		_SarTotalSegments = 
		new SarTotalSegments(*nSarTotalSegments);
}

const SarTotalSegments *
	MessageDeliveryRequestTLVs::getSarTotalSegments() const{
	return _SarTotalSegments;
}

void MessageDeliveryRequestTLVs::setSourceAddrSubunit(
	const SourceAddrSubunit *nSourceAddrSubunit){
	if(_SourceAddrSubunit){
		delete _SourceAddrSubunit;
		_SourceAddrSubunit = 0;
	}
	if(nSourceAddrSubunit)
		_SourceAddrSubunit = 
		new SourceAddrSubunit(*nSourceAddrSubunit);
}

const SourceAddrSubunit *
	MessageDeliveryRequestTLVs::getSourceAddrSubunit() const{
	return _SourceAddrSubunit;
}

void MessageDeliveryRequestTLVs::setSourceNetworkId(
	const SourceNetworkId *nSourceNetworkId){
	if(_SourceNetworkId){
		delete _SourceNetworkId;
		_SourceNetworkId = 0;
	}
	if(nSourceNetworkId)
		_SourceNetworkId = 
		new SourceNetworkId(*nSourceNetworkId);
}

const SourceNetworkId *
	MessageDeliveryRequestTLVs::getSourceNetworkId() const{
	return _SourceNetworkId;
}

void MessageDeliveryRequestTLVs::setSourceNodeId(
	const SourceNodeId *nSourceNodeId){
	if(_SourceNodeId){
		delete _SourceNodeId;
		_SourceNodeId = 0;
	}
	if(nSourceNodeId)
		_SourceNodeId = 
		new SourceNodeId(*nSourceNodeId);
}

const SourceNodeId *
	MessageDeliveryRequestTLVs::getSourceNodeId() const{
	return _SourceNodeId;
}

void MessageDeliveryRequestTLVs::setSourcePort(
	const SourcePort *nSourcePort){
	if(_SourcePort){
		delete _SourcePort;
		_SourcePort = 0;
	}
	if(nSourcePort)
		_SourcePort = 
		new SourcePort(*nSourcePort);
}

const SourcePort *
	MessageDeliveryRequestTLVs::getSourcePort() const{
		return _SourcePort;
}

void MessageDeliveryRequestTLVs::setSourceSubaddress(
	const SourceSubaddress *nSourceSubaddress){
	if(_SourceSubaddress){
		delete _SourceSubaddress;
		_SourceSubaddress = 0;
	}
	if(nSourceSubaddress)
		_SourceSubaddress = 
		new SourceSubaddress(*nSourceSubaddress);
}

const SourceSubaddress *
	MessageDeliveryRequestTLVs::getSourceSubaddress() const{
	return _SourceSubaddress;
}

void MessageDeliveryRequestTLVs::setUserMessageReference(
	const UserMessageReference *nUserMessageReference){
	if(_UserMessageReference){
		delete _UserMessageReference;
		_UserMessageReference = 0;
	}
	if(nUserMessageReference)
		_UserMessageReference = 
		new UserMessageReference(*nUserMessageReference);
}

const UserMessageReference *
	MessageDeliveryRequestTLVs::getUserMessageReference() const{
		return _UserMessageReference;
}

void MessageDeliveryRequestTLVs::setUserResponseCode(
	const UserResponseCode *nUserResponseCode){
	if(_UserResponseCode){
		delete _UserResponseCode;
		_UserResponseCode = 0;
	}
	if(nUserResponseCode)
		_UserResponseCode = 
		new UserResponseCode(*nUserResponseCode);
}

const UserResponseCode *
	MessageDeliveryRequestTLVs::getUserResponseCode() const{
		return _UserResponseCode;
}

void MessageDeliveryRequestTLVs::setUssdServiceOp(
	const UssdServiceOp *nUssdServiceOp){
	if(_UssdServiceOp){
		delete _UssdServiceOp;
		_UssdServiceOp = 0;
	}
	if(nUssdServiceOp)
		_UssdServiceOp = 
		new UssdServiceOp(*nUssdServiceOp);
}

const UssdServiceOp *
	MessageDeliveryRequestTLVs::getUssdServiceOp() const{
	return _UssdServiceOp;
}

const quint16 MessageDeliveryRequestTLVs::getLength() const{
	quint16 length(0);
	if(_CallbackNum)
		length += 4 + _CallbackNum->getLength();
	if(_CallbackNumAtag)
		length += 4 + _CallbackNumAtag->getLength();
	if(_CallbackNumPresInd)
		length += 4 + _CallbackNumPresInd->getLength();
	if(_DestAddrNpCountry)
		length += 4 + _DestAddrNpCountry->getLength();
	if(_DestAddrNpInformation)
		length += 4 + _DestAddrNpInformation->getLength();
	if(_DestAddrNpResolution)
		length += 4 + _DestAddrNpResolution->getLength();
	if(_DestAddrSubunit)
		length += 4 + _DestAddrSubunit->getLength();
	if(_DestNetworkId)
		length += 4 + _DestNetworkId->getLength();
	if(_DestNodeId)
		length += 4 + _DestNodeId->getLength();
	if(_DestSubaddress)
		length += 4 + _DestSubaddress->getLength();
	if(_DestPort)
		length += 4 + _DestPort->getLength();
	if(_DpfResult)
		length += 4 + _DpfResult->getLength();
	if(_ItsReplyType)
		length += 4 + _ItsReplyType->getLength();
	if(_ItsSessionInfo)
		length += 4 + _ItsSessionInfo->getLength();
	if(_LanguageIndicator)
		length += 4 + _LanguageIndicator->getLength();
	if(_MessagePayload)
		length += 4 + _MessagePayload->getLength();
	if(_MessageState)
		length += 4 + _MessageState->getLength();
	if(_NetworkErrorCode)
		length += 4 + _NetworkErrorCode->getLength();
	if(_PayloadType)
		length += 4 + _PayloadType->getLength();
	if(_PrivacyIndicator)
		length += 4 + _PrivacyIndicator->getLength();
	if(_ReceiptedMessageId)
		length += 4 + _ReceiptedMessageId->getLength();
	if(_SarMsgRefNum)
		length += 4 + _SarMsgRefNum->getLength();
	if(_SarSegmentSeqnum)
		length += 4 + _SarSegmentSeqnum->getLength();
	if(_SarTotalSegments)
		length += 4 + _SarTotalSegments->getLength();
	if(_SourceAddrSubunit)
		length += 4 + _SourceAddrSubunit->getLength();
	if(_SourceNetworkId)
		length += 4 + _SourceNetworkId->getLength();
	if(_SourceNodeId)
		length += 4 + _SourceNodeId->getLength();
	if(_SourcePort)
		length += 4 + _SourcePort->getLength();
	if(_SourceSubaddress)
		length += 4 + _SourceSubaddress->getLength();
	if(_UserMessageReference)
		length += 4 + _UserMessageReference->getLength();
	if(_UserResponseCode)
		length += 4 + _UserResponseCode->getLength();
	if(_UssdServiceOp)
		length += 4 + _UssdServiceOp->getLength();
	return length;
}
